package com.zimin.cloud.system.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * <p>
 * 操作日志记录表
 * </p>
 *
 * @author zimin
 * @since 2021-12-30 11:05
 */
@Getter
@Setter
@TableName("sys_operation_log")
@ApiModel(value = "OperationLog对象", description = "操作日志记录表")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class OperationLog {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",
            type = IdType.AUTO)
    private String id;

    @ApiModelProperty("模块标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("业务类型（0其它 1新增 2修改 3删除）")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty("方法名称")
    @TableField("method")
    private String method;

    @ApiModelProperty("请求方式")
    @TableField("request_method")
    private String requestMethod;

    @ApiModelProperty("操作类别（0其它 1后台用户 2手机端用户")
    @TableField("operator_type")
    private Integer operatorType;

    @ApiModelProperty("操作人员")
    @TableField("operator_name")
    private String operatorName;

    @ApiModelProperty("部门名称")
    @TableField("dept_name")
    private String deptName;

    @ApiModelProperty("请求url")
    @TableField("operator_url")
    private String operatorUrl;

    @ApiModelProperty("主机地址")
    @TableField("operator_ip")
    private String operatorIp;

    @ApiModelProperty("操作地址")
    @TableField("operator_location")
    private String operatorLocation;

    @ApiModelProperty("请求参数")
    @TableField("operator_param")
    private String operatorParam;

    @ApiModelProperty("操作状态（0正常 1异常）")
    @TableField("status")
    private Boolean status;

    @ApiModelProperty("方法执行时间")
    @TableField("run_time")
    private Long runTime;

    @ApiModelProperty("操作账号")
    @TableField("account")
    private String account;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
